#include <EASTL/string.h>
#include <array>
namespace EA
{
	namespace StdC
	{
		int Vsnprintf(wchar_t* EA_RESTRICT pDestination, size_t n, const wchar_t* EA_RESTRICT pFormat, va_list arguments)
		{
			//swprintf_s(pDestination,n,)
			if (pDestination == nullptr || n == 0)
			{
				std::array<wchar_t, 512> buf{};
				return vswprintf_s(buf.data(), buf.size(), pFormat, arguments);
			}
			vswprintf_s(pDestination, n, pFormat, arguments);
			return n;
		}
	}
}